//
//  Home.swift
//

import Alamofire

extension Network {
    
    enum Home {
        case list(path: String, age: Int)
    }
}

extension Network.Home: TargetType {
    
    var path: String {
        switch self {
        case let .list(path,_):
            return "api/v1/feature/qmtab_\(path).json"
        }
    }
    
    var parameters: [String: Any] {
        switch self {
        case let .list(_,age):
            return ["mac": "",
                    "exp10": 60,
                    "exp2": 1,
                    "ua": "",
                    "devicetype": 1,
                    "srcApp": "com.ubestkid.collection",
                    "carrier": "46002",
                    "svip_status": 2,
                    "impsize": 1,
                    "exp7": 55,
                    "exp3": 73,
                    "version": "4.0",
                    "make": "apple",
                    "bannersafe": 0,
                    "oaid": "",
                    "sh": 2208,
                    "network": 1,
                    "vps": 10,
                    "sw": 1242,
                    "cpId": "blh",
                    "splashsafe": 0,
                    "channel": "c2",
                    "exp8": 55,
                    "pkg": "com.ubestkid.collection",
                    "exp4": 34,
                    "model": "iPhone8,2",
                    "osv": "14.6",
                    "idfa": "",
                    "ppi": 401,
                    "apiVersion": "1.1.0",
                    "exp9": 37,
                    "os": 1,
                    "androidid": "",
                    "exp5": 39,
                    "ak": LoginService.default.ak,
                    "exp1": 58,
                    "egvip_status": 2,
                    "age": age,
                    "appver": "3.8.3",
                    "res_type": 0,
                    "ip": "",
                    "imei": "",
                    "userId": LoginService.default.userId,
                    "exp6": 4]
        }
    }
}
